Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hover extensions #77

Merged
merged 26 commits into from
Dec 6, 2024
Merged

Add support for hover extensions #77

merged 26 commits into from
Dec 6, 2024

Conversation

fwcd
Copy link
Owner

@fwcd fwcd commented Dec 4, 2024

Fixes #69

This implements support for adding user-defined hovers via external commands, so-called extensions, which can be configured via the config (in VSCode settings.json):

{
  "curry.languageServer.extensions": [
    {
      "name": "Example Extension",
      "extensionPoint": "hover",
      "executable": "printf",
      "args": [
        "%s\n",
        "This is an example output:",
        "Current File:   {currentFile}",
        "Current URI:    {currentUri}",
        "Current Module: {currentModule}",
        "Line:           {line}",
        "Column:         {column}",
        "Type:           {type}",
        "Identifier:     {identifier}",
        "Module:         {module}"
      ]
    }
  ]
}

Other extension points may be added in the future.

To do

  • Implement hover extensions
  • Add some basic template parameters
    • currentFile, currentUri and currentModule
    • line and column
    • identifier and type (when local type information is available)
    • module (the imported module where the identifier is from, if available)

@fwcd fwcd added the enhancement New feature or request label Dec 4, 2024
@fwcd fwcd marked this pull request as ready for review December 6, 2024 02:14
@fwcd fwcd merged commit f456a90 into main Dec 6, 2024
3 checks passed
@fwcd fwcd deleted the extensions branch December 6, 2024 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for configurable analysis extensions
1 participant